package gameSocketer.socketSenders
{
	import com.adobe.serialization.json.JSON;

	public class ChipSocketSender extends SocketSenderBase
	{
		public static var instance:ChipSocketSender;
		
		public function ChipSocketSender(key:Key)
		{
			super();
		}
		
		/**获取游戏逻辑socketer实例*/
		public static function getInstance():ChipSocketSender
		{
			instance||=new ChipSocketSender(new Key());
			return instance;
		}
		
		/**4.1 兑换筹码处理包*/
		public function chipOverPack(num:int):void{
			sendData.writeByte(4);
			sendData.writeByte(1);
			
			tempObj = new Object();
			tempObj["chips"] = num;
			
			sendData.writeUTFBytes(com.adobe.serialization.json.JSON.encode(tempObj));
			
			socketer.send();
		}
	}
}
class Key{}